package com.fduss.artStore.service.impl;

import com.fduss.artStore.dao.ArtistDao;
import com.fduss.artStore.dao.impl.ArtistDaoImpl;
import com.fduss.artStore.entity.Artist;
import com.fduss.artStore.service.ArtistService;

import java.util.List;

/**
 * Created by alex on 29/06/2017.
 */
public class ArtistServiceImpl implements ArtistService {
    private ArtistDao artistDao;

    public ArtistServiceImpl() {
        artistDao = new ArtistDaoImpl();
    }

    @Override
    public Artist add(Artist artist) {
        return artistDao.add(artist);
    }

    @Override
    public void delete(int artistID) {
        artistDao.delete(artistID);
    }

    @Override
    public Artist update(Artist artist) {
        return artistDao.update(artist);
    }

    @Override
    public Artist getOne(int artistId) {
        return artistDao.getOne(artistId);
    }

    @Override
    public List<Artist> getAll() {
        return artistDao.getAll();
    }
}
